Skip to main content

Managing Sub-Process Entities

Depending on the Sub-Processes, they may not have the same Process Entity as their Parent Process.
Thus, to access the Parent Process's case information, consider the context of both processes to evaluate how to navigate the data model.


Reusable Sub-Processes and Process Entities

Reusable Sub-Processes may or may not have the same Process Entity as the Parent Process.

  • If the Sub-Process has the SAME Process Entity as the Parent Process

    • The information of the Parent Process will be available in the exact same XPath.
    • The data navigation will not change from one process to another.
  • If they do NOT have the same Process Entity

    • The Parent Process's information is not directly accessible from the Sub-Process.
    • To access it:
      • Create attributes for the required information in the Sub-Process's Process Entity.
      • Map those attributes from the Parent Process's Entity.
      • This mapping must be defined and related before entering the Sub-Process.

Accessing the Parent Process's Information from the Sub-Process

Let's suppose we have the following Processes:

  • Parent Process: Invoice (Process Entity: Invoice)

  • Reusable Sub-Process: Payments (Process Entity: Payment)

    Managingentities

  • In the Parent Process, attributes are reached by navigating:
    <Invoice.InvoiceAmount>

  • In the Sub-Process, attributes are reached by navigating:
    <Payment.PaymentAmount>

Since the starting point is different, we say that the Context is different.


Making the Invoice Process Information Available in the Payment Sub-Process

Follow these steps to transfer the Parent Process's data to the Sub-Process:

1. Establish a Relationship Between Both Process Entities

  • Create a Payment attribute in the Invoice Entity.

  • Relate it to the Sub-Process Entity (Payment).

    Managingentities3

2. Identify Required Parent Process Attributes

  • Determine which attributes from the Parent Process need to be displayed in the Sub-Process.
  • Create them in the Sub-Process's main entity.

For example, if we need to display:

  • Invoice Amount
  • Invoice Due Date

We create two new attributes in the Payment Entity:

  • Payment Amount
  • Payment Due Date

3. Create an Expression as an "On Enter" Action of the Sub-Process

  • Hold the Shift key while clicking to create the expression.

    Managingentities7

4. Map Parent Process Data to the Sub-Process

  • Create an expression element.

  • Associate (map) the information from the Parent Process to be used in the Sub-Process.

    Managingentities8

5. Associate the Sub-Process Instance to the Parent Process Attribute

  • Finally, associate the Sub-Process entity instance to the attribute in the Parent Process that references the Sub-Process.

    Managingentities9

// Associate the information to be reused
<Invoice.Payment.PaymentAmount> = <Invoice.InvoiceAmount>;
<Invoice.Payment.PaymentDueDate> = <Invoice.InvoiceDueDate>;

// Associate the Sub-Process instance to the Parent process
<Payment> = <Invoice.Payment>;

Updating the Parent Process with Sub-Process Information

Note: If you need to update the Parent Process with information entered in the Sub-Process, you need to create an expression in "On Exit" of the Sub-Process to map the required information.For example, if we need to update the InvoiceAmount in the Parent Process,the expression will reverse the mapping and look like this:

<Invoice.InvoiceAmount> = <Payment.PaymentAmount>

Additionally, if the Parent Process information changes and the Sub-Process needs to be updated,you can use a Message Event to send the information between the Processes.